<!DOCTYPE html>
<html lang="en">

<head>
    <title></title>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <script src="./vue2.js"></script>
    <style>
        .slider-enter,
        .slider-leave-to {
            padding-left: 100px;
        }

        .slider-enter-active,
        .slider-leave-active {
            transition: all 2s;
        }

        .slider-enter-to,
        .slider-leave {
            padding-left: 0px;
        }
    </style>
</head>

<body>
    <div id="app">
        <transition name="slider">
            <div v-if="isShow">itcast</div>
        </transition>

        <button @click="isShow=!isShow">点击</button>
    </div>
    <script>
        var vm = new Vue({
            el: '#app',
            data: {
                isShow: true
            }
        })
    </script>
</body>

</html>